.class public Lcom/estrongs/android/pop/app/shortcut/a;
.super Les/gl;
.source "AppStartShortcutManager.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/app/shortcut/a$c;,
        Lcom/estrongs/android/pop/app/shortcut/a$b;
    }
.end annotation


# static fields
.field public static e:Ljava/lang/String; = "disk_analysis"

.field private static f:Lcom/estrongs/android/pop/app/shortcut/a;


# instance fields
.field private d:Lcom/estrongs/android/pop/app/shortcut/a$b;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .line 1
    sget-object v0, Les/fl;->f:Ljava/lang/String;

    const/4 v1, 0x0

    invoke-direct {p0, v0, v1}, Les/gl;-><init>(Ljava/lang/String;Z)V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/pop/app/shortcut/a;->d:Lcom/estrongs/android/pop/app/shortcut/a$b;

    return-void
.end method

.method public static g()Lcom/estrongs/android/pop/app/shortcut/a;
    .locals 2

    .line 1
    sget-object v0, Lcom/estrongs/android/pop/app/shortcut/a;->f:Lcom/estrongs/android/pop/app/shortcut/a;

    if-nez v0, :cond_1

    .line 2
    const-class v0, Lcom/estrongs/android/pop/app/shortcut/a;

    monitor-enter v0

    .line 3
    :try_start_0
    sget-object v1, Lcom/estrongs/android/pop/app/shortcut/a;->f:Lcom/estrongs/android/pop/app/shortcut/a;

    if-nez v1, :cond_0

    .line 4
    new-instance v1, Lcom/estrongs/android/pop/app/shortcut/a;

    invoke-direct {v1}, Lcom/estrongs/android/pop/app/shortcut/a;-><init>()V

    sput-object v1, Lcom/estrongs/android/pop/app/shortcut/a;->f:Lcom/estrongs/android/pop/app/shortcut/a;

    .line 5
    :cond_0
    monitor-exit v0

    goto :goto_0

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1

    .line 6
    :cond_1
    :goto_0
    sget-object v0, Lcom/estrongs/android/pop/app/shortcut/a;->f:Lcom/estrongs/android/pop/app/shortcut/a;

    return-object v0
.end method


# virtual methods
.method protected a(Ljava/lang/String;IZ)Les/ll;
    .locals 6

    const/4 p2, 0x0

    .line 1
    :try_start_0
    new-instance p3, Lorg/json/JSONObject;

    invoke-direct {p3, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 2
    new-instance p1, Lcom/estrongs/android/pop/app/shortcut/a$b;

    invoke-direct {p1, p0, p2}, Lcom/estrongs/android/pop/app/shortcut/a$b;-><init>(Lcom/estrongs/android/pop/app/shortcut/a;Lcom/estrongs/android/pop/app/shortcut/a$a;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    :try_start_1
    const-string v0, "name"

    .line 3
    invoke-virtual {p3, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p1, Lcom/estrongs/android/pop/app/shortcut/a$b;->c:Ljava/lang/String;

    const-string v0, "enable"

    .line 4
    invoke-virtual {p3, v0}, Lorg/json/JSONObject;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p1, Lcom/estrongs/android/pop/app/shortcut/a$b;->d:Z

    const-string v0, "data"

    .line 5
    invoke-virtual {p3, v0}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p3

    if-nez p3, :cond_0

    goto :goto_2

    :cond_0
    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 6
    :goto_0
    invoke-virtual {p3}, Lorg/json/JSONArray;->length()I

    move-result v2

    if-ge v1, v2, :cond_1

    .line 7
    new-instance v2, Lcom/estrongs/android/pop/app/shortcut/a$c;

    invoke-direct {v2, p0, p2}, Lcom/estrongs/android/pop/app/shortcut/a$c;-><init>(Lcom/estrongs/android/pop/app/shortcut/a;Lcom/estrongs/android/pop/app/shortcut/a$a;)V

    .line 8
    invoke-virtual {p3, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v3

    const-string v4, "type"

    .line 9
    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/estrongs/android/pop/app/shortcut/a$c;->a:Ljava/lang/String;

    const-string v4, "newuser"

    .line 10
    invoke-virtual {v3, v4, v0}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z

    move-result v4

    iput-boolean v4, v2, Lcom/estrongs/android/pop/app/shortcut/a$c;->b:Z

    const-string v4, "olduser"

    .line 11
    invoke-virtual {v3, v4, v0}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z

    move-result v3

    iput-boolean v3, v2, Lcom/estrongs/android/pop/app/shortcut/a$c;->c:Z

    .line 12
    invoke-virtual {p1, v2}, Lcom/estrongs/android/pop/app/shortcut/a$b;->a(Lcom/estrongs/android/pop/app/shortcut/a$c;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :catch_0
    move-exception p2

    goto :goto_1

    :catch_1
    move-exception p1

    move-object v5, p2

    move-object p2, p1

    move-object p1, v5

    .line 13
    :goto_1
    invoke-virtual {p2}, Ljava/lang/Exception;->printStackTrace()V

    :cond_1
    move-object p2, p1

    :goto_2
    return-object p2
.end method

.method public a(Ljava/lang/String;)Z
    .locals 3

    .line 14
    invoke-virtual {p0}, Les/gl;->b()Les/ll;

    move-result-object v0

    .line 15
    instance-of v1, v0, Lcom/estrongs/android/pop/app/shortcut/a$b;

    if-eqz v1, :cond_0

    .line 16
    check-cast v0, Lcom/estrongs/android/pop/app/shortcut/a$b;

    iput-object v0, p0, Lcom/estrongs/android/pop/app/shortcut/a;->d:Lcom/estrongs/android/pop/app/shortcut/a$b;

    .line 17
    :cond_0
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_4

    iget-object v0, p0, Lcom/estrongs/android/pop/app/shortcut/a;->d:Lcom/estrongs/android/pop/app/shortcut/a$b;

    if-eqz v0, :cond_4

    iget-boolean v2, v0, Lcom/estrongs/android/pop/app/shortcut/a$b;->d:Z

    if-nez v2, :cond_1

    goto :goto_0

    .line 18
    :cond_1
    invoke-virtual {v0, p1}, Lcom/estrongs/android/pop/app/shortcut/a$b;->a(Ljava/lang/String;)Lcom/estrongs/android/pop/app/shortcut/a$c;

    move-result-object p1

    if-nez p1, :cond_2

    return v1

    .line 19
    :cond_2
    invoke-static {}, Les/eo;->k()Les/eo;

    move-result-object v0

    invoke-virtual {v0}, Les/eo;->d()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 20
    iget-boolean p1, p1, Lcom/estrongs/android/pop/app/shortcut/a$c;->b:Z

    return p1

    .line 21
    :cond_3
    iget-boolean p1, p1, Lcom/estrongs/android/pop/app/shortcut/a$c;->c:Z

    return p1

    :cond_4
    :goto_0
    return v1
.end method

.method protected d()Les/ll;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/shortcut/a;->d:Lcom/estrongs/android/pop/app/shortcut/a$b;

    return-object v0
.end method
